﻿using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using YWM.DependencyInjection;

namespace YWM.Repositories
{
    public interface IAsyncQueryableExecuter : ITransient
    {
        Task<int> CountAsync<TEntity>(IQueryable<TEntity> query);

        Task<List<T>> ToListAsync<T>(IQueryable<T> queryable);

        Task<T> FirstOrDefaultAsync<T>(IQueryable<T> queryable);
    }
}
